import http from '@/utils/httpRequest'

/**
 * 获取地块列表
 * @param data
 */
export function queryLandListList (data) {
  return http({
    url: '/api/affairs/landController/selectLandList',
    method: 'post',
    data
  })
}

/**
 * 获取农事任务统计
 */
export function queryTaskAllCount () {
  return http({
    url: '/api/affairs/taskController/getTaskAllCount',
    method: 'get'
  })
}

/**
 * 根据地块id获取巡田统计
 * @param landId
 */
export function queryInspectionFrequency (landId) {
  return http({
    url: '/api/affairs/inspectionController/getInspectionFrequency/' + landId,
    method: 'get'
  })
}

/**
 * 农资库存分析
 * @param data
 */
export function queryStockAnalysis (data) {
  return http({
    url: '/api/material/stock/analysis/goods',
    method: 'get',
    param: data
  })
}

/**
 * 农资库存分析明细
 * @param data
 */
export function queryStockAnalysisDetail (goodsTypeId) {
  return http({
    url: '/api/material/stock/analysis/goods/detail?goodsTypeId=' + goodsTypeId,
    method: 'get'
  })
}

/**
 * 登出
 * @returns {*}
 */
export function logout () {
  return request({
    url: '/oauth/logout',
    method: 'post'
  })
}
